package com.ddwl.schema.bo.gate.wechat;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Collections;
import java.util.List;

@Setter
@Getter
public class WxCustomMsgBo {

    private String touser;
    private String msgtype;
    private News news;
    private News mpnews;
    private Text text;

    @Setter
    @Getter
    @NoArgsConstructor
    public class News {
        private List<Article> articles;
        private String media_id;

        public News(String media_id) {
            this.media_id = media_id;
        }

        public News(Article article) {
            this.articles = Collections.singletonList(article);
        }
    }

    @Setter
    @Getter
    public class Article {
        private String title;
        private String description;
        private String url;
        private String picurl;
        private String thumb_media_id;
        private String author;
        private String content_source_url;
        private String content;
        private String digest;
        private Integer show_cover_pic;
        private String thumb_url;
        private Integer need_open_comment;
        private Integer only_fans_can_comment;
    }

    @Setter
    @Getter
    @NoArgsConstructor
    public class Text {
        private String content;

        public Text(String content) {
            this.content = content;
        }
    }
}